<%@ CODEPAGE=65001 %>
<% Option Explicit %>
<% On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="..\..\..\zb_users\c_option.asp" -->
<!-- #include file="..\..\..\zb_system\function/c_function.asp" -->
<!-- #include file="..\..\..\zb_system\function/c_system_lib.asp" -->
<!-- #include file="..\..\..\zb_system\function/c_system_base.asp" -->
<!-- #include file="..\..\..\zb_system\function/c_system_plugin.asp" -->
<!-- #include file="include.asp" -->
<%
Call System_Initialize()
'检查非法链接
Call CheckReference("")
'检查权限
if CheckPluginState("rndarticle")=False Then Call ShowError(48)

Dim objRS
Dim objArticle

Randomize
Set objRS=objConn.Execute("SELECT TOP 1 [log_ID] FROM [blog_Article] WHERE [log_Level]>3 order by "&IIf(ZC_MSSQL_ENABLE,"newid()","rnd(-([log_id]+"""&Rnd&"""))"))

If (Not objRS.bof) And (Not objRS.eof) Then
	Set objArticle=New TArticle
	If objArticle.LoadInfoByID(objRS("log_ID")) Then
		Response.Redirect objArticle.Url 
	End If
	Set objArticle=Nothing
    objRS.Close
End If

Call System_Terminate()
%>